object dmWEB: TdmWEB
  OldCreateOrder = False
  Left = 280
  Top = 39
  Height = 953
  Width = 1213
  object qryCliente: TQuery
    BeforeOpen = qryClienteBeforeOpen
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'SELECT * FROM ENTIDADE'
      'where (Ent_ExportadoWEB <> '#39'S'#39')'
      'ORDER BY ENT_CODIGO')
    Left = 24
    Top = 16
  end
  object dspCliente: TDataSetProvider
    DataSet = qryCliente
    Left = 88
    Top = 16
  end
  object CDSCliente: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspCliente'
    Left = 160
    Top = 16
    object CDSClienteENT_CODIGO: TStringField
      Tag = 1
      FieldName = 'ENT_CODIGO'
      Required = True
      Size = 5
    end
    object CDSClienteGRUPO_CODIGO: TStringField
      FieldName = 'GRUPO_CODIGO'
      Size = 4
    end
    object CDSClienteSUP_CODIGO: TStringField
      FieldName = 'SUP_CODIGO'
      Size = 3
    end
    object CDSClienteENT_CNPJ: TStringField
      FieldName = 'ENT_CNPJ'
      Size = 18
    end
    object CDSClienteREGIAO_CODIGO: TStringField
      FieldName = 'REGIAO_CODIGO'
      Size = 3
    end
    object CDSClienteREP_CODIGO: TStringField
      FieldName = 'REP_CODIGO'
      Size = 3
    end
    object CDSClienteLINHA_CODIGO: TStringField
      FieldName = 'LINHA_CODIGO'
      Size = 3
    end
    object CDSClienteLOCAL_CODIGO: TStringField
      FieldName = 'LOCAL_CODIGO'
      Size = 3
    end
    object CDSClienteSUBL_CODIGO: TStringField
      FieldName = 'SUBL_CODIGO'
      Size = 3
    end
    object CDSClienteRAMO_CODIGO: TStringField
      FieldName = 'RAMO_CODIGO'
      Size = 3
    end
    object CDSClienteENT_NOME: TStringField
      FieldName = 'ENT_NOME'
      Size = 80
    end
    object CDSClienteENT_FANTASIA: TStringField
      FieldName = 'ENT_FANTASIA'
      Size = 25
    end
    object CDSClienteENT_INSCEST: TStringField
      FieldName = 'ENT_INSCEST'
      Size = 21
    end
    object CDSClienteENT_STATUS: TStringField
      FieldName = 'ENT_STATUS'
      Size = 5
    end
    object CDSClienteENT_DATACAD: TDateTimeField
      FieldName = 'ENT_DATACAD'
    end
    object CDSClienteENT_DATAINA: TDateTimeField
      FieldName = 'ENT_DATAINA'
    end
    object CDSClienteENT_LIMITE: TFloatField
      FieldName = 'ENT_LIMITE'
    end
    object CDSClienteENT_EMAIL: TStringField
      FieldName = 'ENT_EMAIL'
      Size = 50
    end
    object CDSClienteENT_OBSERVACAO: TBlobField
      FieldName = 'ENT_OBSERVACAO'
      Size = 1
    end
    object CDSClienteENT_HOMEPAGE: TStringField
      FieldName = 'ENT_HOMEPAGE'
      Size = 40
    end
    object CDSClienteENT_BLOQUEADO: TStringField
      FieldName = 'ENT_BLOQUEADO'
      Size = 1
    end
    object CDSClienteENT_CONTABIL: TStringField
      FieldName = 'ENT_CONTABIL'
      Visible = False
      Size = 10
    end
    object CDSClienteENT_CPF: TStringField
      FieldName = 'ENT_CPF'
      Size = 14
    end
    object CDSClienteENT_TIPO: TFloatField
      FieldName = 'ENT_TIPO'
    end
    object CDSClienteENT_TIPOENT: TFloatField
      FieldName = 'ENT_TIPOENT'
    end
    object CDSClienteENT_HOMOLOGADO: TStringField
      FieldName = 'ENT_HOMOLOGADO'
      Size = 1
    end
    object CDSClienteENT_RG: TStringField
      FieldName = 'ENT_RG'
      Size = 11
    end
    object CDSClienteENT_NASC: TDateTimeField
      FieldName = 'ENT_NASC'
    end
    object CDSClienteENT_CONTABIL2: TStringField
      FieldName = 'ENT_CONTABIL2'
      Visible = False
      Size = 10
    end
    object CDSClienteTAB_CODIGO: TStringField
      FieldName = 'TAB_CODIGO'
      Size = 3
    end
    object CDSClienteENT_COMISS: TFloatField
      FieldName = 'ENT_COMISS'
    end
    object CDSClienteENT_GERREM: TStringField
      FieldName = 'ENT_GERREM'
      Size = 1
    end
    object CDSClienteENT_TEMIPI: TStringField
      FieldName = 'ENT_TEMIPI'
      FixedChar = True
      Size = 1
    end
    object CDSClienteENT_TEMICMS: TStringField
      FieldName = 'ENT_TEMICMS'
      FixedChar = True
      Size = 1
    end
    object CDSClienteCOD_MENSAGEM: TStringField
      FieldName = 'COD_MENSAGEM'
      Size = 3
    end
    object CDSClienteCOD_SUFRAMA: TStringField
      FieldName = 'COD_SUFRAMA'
      Size = 9
    end
    object CDSClienteMSG_SUFRAMA: TStringField
      FieldName = 'MSG_SUFRAMA'
      Size = 3
    end
    object CDSClienteCFOP_SUFRAMA: TStringField
      FieldName = 'CFOP_SUFRAMA'
      Size = 5
    end
    object CDSClienteDESC_SUFRAMA: TFloatField
      FieldName = 'DESC_SUFRAMA'
    end
    object CDSClienteENT_MODALIDADE: TStringField
      FieldName = 'ENT_MODALIDADE'
      FixedChar = True
      Size = 1
    end
    object CDSClienteENT_IMPREND: TStringField
      FieldName = 'ENT_IMPREND'
      Visible = False
      FixedChar = True
      Size = 1
    end
    object CDSClienteENT_INSCEST_SUBST: TStringField
      FieldName = 'ENT_INSCEST_SUBST'
      Size = 21
    end
    object CDSClienteENT_DESCPISSUFRAMA: TStringField
      FieldName = 'ENT_DESCPISSUFRAMA'
      FixedChar = True
      Size = 1
    end
    object CDSClienteENT_DESCCOFINSSUFRAMA: TStringField
      FieldName = 'ENT_DESCCOFINSSUFRAMA'
      FixedChar = True
      Size = 1
    end
    object CDSClienteENT_INSC_INSS: TStringField
      FieldName = 'ENT_INSC_INSS'
      Size = 15
    end
    object CDSClienteENT_DESCICMSSUFRAMA: TStringField
      FieldName = 'ENT_DESCICMSSUFRAMA'
      FixedChar = True
      Size = 1
    end
    object CDSClienteENT_EXPORTADOWEB: TStringField
      FieldName = 'ENT_EXPORTADOWEB'
      FixedChar = True
      Size = 1
    end
  end
  object qryEndereco: TQuery
    BeforeOpen = qryEnderecoBeforeOpen
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'select ENT_CODIGO, TIPEND_CODIGO, END_CODIGO, CID_CODIGO,'
      
        'case when (instr(end_endereco,'#39','#39') > 0) and (end_numero is not n' +
        'ull) then'
      ' substr(end_endereco,1,instr(end_endereco,'#39','#39')-1) '
      'else'
      ' end_endereco'
      'end as end_endereco, '
      
        'END_BAIRRO,END_CEP, END_FONE,END_FAX,END_NUMERO,END_CELULAR,END_' +
        'COMPLEMENTO,END_CNPJ'
      'from endereco'
      'where ENT_CODIGO in'
      '(select Ent_Codigo from Entidade where Ent_ExportadoWEB <> '#39'S'#39')'
      'ORDER BY ENT_CODIGO, END_CODIGO')
    Left = 24
    Top = 72
  end
  object dspEndereco: TDataSetProvider
    DataSet = qryEndereco
    Left = 88
    Top = 72
  end
  object CDSEndereco: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspEndereco'
    Left = 160
    Top = 72
    object CDSEnderecoENT_CODIGO: TStringField
      Tag = 1
      FieldName = 'ENT_CODIGO'
      Required = True
      Size = 5
    end
    object CDSEnderecoTIPEND_CODIGO: TStringField
      Tag = 1
      FieldName = 'TIPEND_CODIGO'
      Required = True
      Size = 2
    end
    object CDSEnderecoEND_CODIGO: TStringField
      Tag = 1
      FieldName = 'END_CODIGO'
      Required = True
      Size = 2
    end
    object CDSEnderecoCID_CODIGO: TStringField
      FieldName = 'CID_CODIGO'
      Size = 4
    end
    object CDSEnderecoEND_ENDERECO: TStringField
      FieldName = 'END_ENDERECO'
      Size = 46
    end
    object CDSEnderecoEND_BAIRRO: TStringField
      FieldName = 'END_BAIRRO'
      Size = 25
    end
    object CDSEnderecoEND_CEP: TStringField
      FieldName = 'END_CEP'
      Size = 9
    end
    object CDSEnderecoEND_FONE: TStringField
      FieldName = 'END_FONE'
      Size = 13
    end
    object CDSEnderecoEND_FAX: TStringField
      FieldName = 'END_FAX'
      Size = 13
    end
    object CDSEnderecoEND_NUMERO: TStringField
      FieldName = 'END_NUMERO'
      Size = 10
    end
    object CDSEnderecoEND_CELULAR: TStringField
      FieldName = 'END_CELULAR'
      Size = 13
    end
    object CDSEnderecoEND_COMPLEMENTO: TStringField
      FieldName = 'END_COMPLEMENTO'
      Size = 60
    end
    object CDSEnderecoEND_CNPJ: TStringField
      FieldName = 'END_CNPJ'
      Size = 14
    end
  end
  object qryEmpresa: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'SELECT EMP_CODIGO            ,'
      'CID_CODIGO            ,'
      'EMP_RAZAO             ,'
      'EMP_CNPJ              ,'
      'EMP_INSCEST           ,'
      'EMP_ENDERECO          ,'
      'EMP_TELEFONE          ,'
      'EMP_CEP               ,'
      'EMP_FAX               ,'
      'EMP_CXPOSTAL          ,'
      'EMP_FANTASIA          ,'
      'EMP_EMAIL             ,'
      'EMP_SIMPLESNAC        ,'
      'EMP_NUMERO            ,'
      'EMP_BAIRRO            ,'
      'EMP_INSCESTSUBSTT     ,'
      'EMP_INSCMUNICIPAL     ,'
      'EMP_ALIQISS           ,'
      'EMP_ALIQIPI           '
      'FROM EMPRESA'
      'ORDER BY EMP_CODIGO')
    Left = 24
    Top = 128
  end
  object dspEmpresa: TDataSetProvider
    DataSet = qryEmpresa
    Left = 88
    Top = 128
  end
  object CDSEmpresa: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspEmpresa'
    Left = 160
    Top = 128
    object CDSEmpresaEMP_CODIGO: TStringField
      FieldName = 'EMP_CODIGO'
      Required = True
      Size = 3
    end
    object CDSEmpresaCID_CODIGO: TStringField
      FieldName = 'CID_CODIGO'
      Size = 4
    end
    object CDSEmpresaEMP_RAZAO: TStringField
      FieldName = 'EMP_RAZAO'
      Size = 40
    end
    object CDSEmpresaEMP_CNPJ: TStringField
      FieldName = 'EMP_CNPJ'
      Size = 18
    end
    object CDSEmpresaEMP_INSCEST: TStringField
      FieldName = 'EMP_INSCEST'
      Size = 15
    end
    object CDSEmpresaEMP_ENDERECO: TStringField
      FieldName = 'EMP_ENDERECO'
      Size = 40
    end
    object CDSEmpresaEMP_TELEFONE: TStringField
      FieldName = 'EMP_TELEFONE'
      Size = 10
    end
    object CDSEmpresaEMP_CEP: TStringField
      FieldName = 'EMP_CEP'
      Size = 9
    end
    object CDSEmpresaEMP_FAX: TStringField
      FieldName = 'EMP_FAX'
      Size = 10
    end
    object CDSEmpresaEMP_CXPOSTAL: TStringField
      FieldName = 'EMP_CXPOSTAL'
      Size = 5
    end
    object CDSEmpresaEMP_FANTASIA: TStringField
      FieldName = 'EMP_FANTASIA'
      Size = 30
    end
    object CDSEmpresaEMP_EMAIL: TStringField
      FieldName = 'EMP_EMAIL'
      Size = 50
    end
    object CDSEmpresaEMP_SIMPLESNAC: TStringField
      FieldName = 'EMP_SIMPLESNAC'
      Size = 1
    end
    object CDSEmpresaEMP_NUMERO: TStringField
      FieldName = 'EMP_NUMERO'
      Size = 10
    end
    object CDSEmpresaEMP_BAIRRO: TStringField
      FieldName = 'EMP_BAIRRO'
      Size = 25
    end
    object CDSEmpresaEMP_INSCESTSUBSTT: TStringField
      FieldName = 'EMP_INSCESTSUBSTT'
      Size = 15
    end
    object CDSEmpresaEMP_INSCMUNICIPAL: TStringField
      FieldName = 'EMP_INSCMUNICIPAL'
      Size = 19
    end
    object CDSEmpresaEMP_ALIQISS: TFloatField
      FieldName = 'EMP_ALIQISS'
    end
    object CDSEmpresaEMP_ALIQIPI: TFloatField
      FieldName = 'EMP_ALIQIPI'
    end
  end
  object qryGrupoEmpresarial: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'SELECT * FROM GRUPOEMPRESARIAL'
      'ORDER BY GRUPO_CODIGO')
    Left = 24
    Top = 183
  end
  object dspGrupoEmpresarial: TDataSetProvider
    DataSet = qryGrupoEmpresarial
    Left = 88
    Top = 183
  end
  object CDSGrupo_empresarial: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspGrupoEmpresarial'
    Left = 176
    Top = 183
    object CDSGrupo_empresarialGRUPO_CODIGO: TStringField
      FieldName = 'GRUPO_CODIGO'
      Required = True
      Size = 4
    end
    object CDSGrupo_empresarialGRUPO_NOME: TStringField
      FieldName = 'GRUPO_NOME'
      Size = 40
    end
  end
  object CDSCidade: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspCidade'
    Left = 160
    Top = 231
    object CDSCidadeCID_CODIGO: TStringField
      FieldName = 'CID_CODIGO'
      Required = True
      Size = 4
    end
    object CDSCidadePAIS_CODIGO: TStringField
      FieldName = 'PAIS_CODIGO'
      Size = 2
    end
    object CDSCidadeEST_SIGLA: TStringField
      FieldName = 'EST_SIGLA'
      Size = 2
    end
    object CDSCidadeCID_NOME: TStringField
      FieldName = 'CID_NOME'
      Size = 50
    end
    object CDSCidadeCID_DDD: TStringField
      FieldName = 'CID_DDD'
      Size = 4
    end
    object CDSCidadeCID_CEP: TStringField
      FieldName = 'CID_CEP'
      Size = 9
    end
    object CDSCidadeCID_CODMUNICIPIO: TStringField
      FieldName = 'CID_CODMUNICIPIO'
      Size = 7
    end
  end
  object dspCidade: TDataSetProvider
    DataSet = qryCidade
    Left = 88
    Top = 231
  end
  object qryCidade: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'SELECT * FROM CIDADE'
      'ORDER BY CID_CODIGO')
    Left = 24
    Top = 231
  end
  object CDSSupervisor: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspSupervisor'
    Left = 160
    Top = 280
    object CDSSupervisorSUP_CODIGO: TStringField
      FieldName = 'SUP_CODIGO'
      Required = True
      Size = 3
    end
    object CDSSupervisorCID_CODIGO: TStringField
      FieldName = 'CID_CODIGO'
      Size = 4
    end
    object CDSSupervisorBAN_CODIGO: TStringField
      FieldName = 'BAN_CODIGO'
      Size = 3
    end
    object CDSSupervisorSUP_NOME: TStringField
      FieldName = 'SUP_NOME'
      Size = 40
    end
    object CDSSupervisorSUP_RESPONSAVEL: TStringField
      FieldName = 'SUP_RESPONSAVEL'
      Size = 40
    end
    object CDSSupervisorSUP_ENDERECO: TStringField
      FieldName = 'SUP_ENDERECO'
      Size = 40
    end
    object CDSSupervisorSUP_BAIRRO: TStringField
      FieldName = 'SUP_BAIRRO'
      Size = 25
    end
    object CDSSupervisorSUP_FONE: TStringField
      FieldName = 'SUP_FONE'
      Size = 13
    end
    object CDSSupervisorSUP_CEP: TStringField
      FieldName = 'SUP_CEP'
      Size = 9
    end
    object CDSSupervisorSUP_NUMCONTA: TStringField
      FieldName = 'SUP_NUMCONTA'
      Size = 10
    end
    object CDSSupervisorSUP_AGENCIA: TStringField
      FieldName = 'SUP_AGENCIA'
      Size = 10
    end
    object CDSSupervisorSUP_COMISSAO: TFloatField
      FieldName = 'SUP_COMISSAO'
    end
    object CDSSupervisorSUP_CNPJ: TStringField
      FieldName = 'SUP_CNPJ'
      Size = 18
    end
    object CDSSupervisorSUP_CPF: TStringField
      FieldName = 'SUP_CPF'
      Size = 14
    end
    object CDSSupervisorSUP_INSCEST: TStringField
      FieldName = 'SUP_INSCEST'
      Size = 21
    end
    object CDSSupervisorSUP_DATAINA: TDateTimeField
      FieldName = 'SUP_DATAINA'
    end
    object CDSSupervisorSUP_RG: TStringField
      FieldName = 'SUP_RG'
      Size = 12
    end
    object CDSSupervisorSUP_DATACAD: TDateTimeField
      FieldName = 'SUP_DATACAD'
    end
    object CDSSupervisorSUP_SALDOINICIAL: TFloatField
      FieldName = 'SUP_SALDOINICIAL'
    end
    object CDSSupervisorSUP_OBSERVACAO: TBlobField
      FieldName = 'SUP_OBSERVACAO'
      Size = 1
    end
    object CDSSupervisorSUP_CELULAR: TStringField
      FieldName = 'SUP_CELULAR'
      Size = 15
    end
    object CDSSupervisorSUP_EMAIL: TStringField
      FieldName = 'SUP_EMAIL'
      Size = 50
    end
    object CDSSupervisorHIST_CODIGO: TStringField
      FieldName = 'HIST_CODIGO'
      Size = 10
    end
    object CDSSupervisorSUP_RAZAO: TStringField
      FieldName = 'SUP_RAZAO'
      Size = 50
    end
    object CDSSupervisorBAN_NOME: TStringField
      FieldName = 'BAN_NOME'
      Size = 40
    end
  end
  object dspSupervisor: TDataSetProvider
    DataSet = qrySupervisor
    Left = 88
    Top = 280
  end
  object qrySupervisor: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'SELECT S.*, BAN_NOME FROM SUPERVISOR S, BANCO B'
      'where S.BAN_CODIGO = B.BAN_CODIGO(+)'
      'ORDER BY SUP_CODIGO')
    Left = 24
    Top = 280
  end
  object CDSRegiao_venda: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspRegiaoVenda'
    Left = 192
    Top = 331
    object CDSRegiao_vendaREGIAO_CODIGO: TStringField
      FieldName = 'REGIAO_CODIGO'
      Required = True
      Size = 3
    end
    object CDSRegiao_vendaREGIAO_DESCRICAO: TStringField
      FieldName = 'REGIAO_DESCRICAO'
      Size = 40
    end
    object CDSRegiao_vendaREGIAO_UF: TStringField
      FieldName = 'REGIAO_UF'
      Size = 2
    end
  end
  object dspRegiaoVenda: TDataSetProvider
    DataSet = qryRegiaoVenda
    Left = 88
    Top = 331
  end
  object qryRegiaoVenda: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'SELECT * from REGIAOVENDA'
      'ORDER BY REGIAO_CODIGO')
    Left = 24
    Top = 331
  end
  object CDSDivisao: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspDivisao'
    Left = 176
    Top = 379
    object CDSDivisaoDIV_CODIGO: TStringField
      FieldName = 'DIV_CODIGO'
      Required = True
      Size = 2
    end
    object CDSDivisaoDIV_DESCRICAO: TStringField
      FieldName = 'DIV_DESCRICAO'
      Size = 30
    end
  end
  object dspDivisao: TDataSetProvider
    DataSet = qryDivisao
    Left = 88
    Top = 379
  end
  object qryDivisao: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'SELECT * from DIVISAO'
      'ORDER BY DIV_CODIGO')
    Left = 24
    Top = 379
  end
  object CDSLinha_produto: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspLinhaProduto'
    Left = 176
    Top = 427
    object CDSLinha_produtoLIN_CODIGO: TStringField
      FieldName = 'LIN_CODIGO'
      Required = True
      Size = 2
    end
    object CDSLinha_produtoLIN_DESCRICAO: TStringField
      FieldName = 'LIN_DESCRICAO'
      Size = 30
    end
  end
  object dspLinhaProduto: TDataSetProvider
    DataSet = qryLinhaProduto
    Left = 88
    Top = 427
  end
  object qryLinhaProduto: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'SELECT * from LINHAPRODUTO'
      'ORDER BY LIN_CODIGO')
    Left = 24
    Top = 427
  end
  object CDSNbm: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspNBM'
    Left = 168
    Top = 475
    object CDSNbmNBM_CODIGO: TStringField
      FieldName = 'NBM_CODIGO'
      Required = True
      Size = 3
    end
    object CDSNbmNBM_DESC: TStringField
      FieldName = 'NBM_DESC'
      Size = 12
    end
    object CDSNbmNBM_DESCRICAO: TStringField
      FieldName = 'NBM_DESCRICAO'
      Size = 40
    end
  end
  object dspNBM: TDataSetProvider
    DataSet = qryNBM
    Left = 88
    Top = 475
  end
  object qryNBM: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'SELECT * from NBM'
      'ORDER BY NBM_CODIGO')
    Left = 24
    Top = 475
  end
  object CDSFase_processo: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspFaseProcesso'
    Left = 184
    Top = 523
    object CDSFase_processoFASE_CODIGO: TStringField
      FieldName = 'FASE_CODIGO'
      Required = True
      Size = 2
    end
    object CDSFase_processoFASE_DESCRICAO: TStringField
      FieldName = 'FASE_DESCRICAO'
      Size = 30
    end
    object CDSFase_processoFASE_TIPO: TStringField
      FieldName = 'FASE_TIPO'
      Size = 3
    end
  end
  object dspFaseProcesso: TDataSetProvider
    DataSet = qryFaseProcesso
    Left = 88
    Top = 523
  end
  object qryFaseProcesso: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'select FASE_CODIGO, FASE_DESCRICAO,'
      
        ' case when Fase_codigo = (select Fase_Acabado from Parametros) t' +
        'hen'
      '  '#39'AC'#39
      ' else'
      
        '  case when Fase_codigo = (select Fase_Nivel from Parametros) th' +
        'en'
      '   '#39'IN'#39
      '  else'
      
        '   case when Fase_codigo = (select Fase_MatPrima from Parametros' +
        ') then'
      '    '#39'MP'#39
      '   else'
      '    '#39'MPi'#39
      '   end'
      '  end'
      ' end as FASE_TIPO'
      'from FASEPROCESSO'
      'order by FASE_CODIGO')
    Left = 24
    Top = 523
  end
  object CDSProduto: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspProduto'
    Left = 176
    Top = 571
    object CDSProdutoPRO_CODIGO: TStringField
      FieldName = 'PRO_CODIGO'
      Required = True
    end
    object CDSProdutoEMP_CODIGO: TStringField
      FieldName = 'EMP_CODIGO'
      Size = 3
    end
    object CDSProdutoDIV_CODIGO: TStringField
      FieldName = 'DIV_CODIGO'
      Size = 2
    end
    object CDSProdutoLIN_CODIGO: TStringField
      FieldName = 'LIN_CODIGO'
      Size = 2
    end
    object CDSProdutoNBM_CODIGO: TStringField
      FieldName = 'NBM_CODIGO'
      Size = 3
    end
    object CDSProdutoFASE_CODIGO: TStringField
      FieldName = 'FASE_CODIGO'
      Size = 2
    end
    object CDSProdutoPRO_NOME: TStringField
      FieldName = 'PRO_NOME'
      Size = 70
    end
    object CDSProdutoPRO_UNIDADE: TStringField
      FieldName = 'PRO_UNIDADE'
      Size = 3
    end
    object CDSProdutoPRO_PESOLIQ: TFloatField
      FieldName = 'PRO_PESOLIQ'
    end
    object CDSProdutoPRO_PESOBRU: TFloatField
      FieldName = 'PRO_PESOBRU'
    end
    object CDSProdutoPRO_CODTRIBUTARIO: TStringField
      FieldName = 'PRO_CODTRIBUTARIO'
      Size = 3
    end
    object CDSProdutoPRO_NUMEROEMB: TFloatField
      FieldName = 'PRO_NUMEROEMB'
    end
    object CDSProdutoPRO_ALIQIPI: TFloatField
      FieldName = 'PRO_ALIQIPI'
    end
    object CDSProdutoPRO_PRECOVENDA: TFloatField
      FieldName = 'PRO_PRECOVENDA'
    end
    object CDSProdutoPRO_ATIVO: TFloatField
      FieldName = 'PRO_ATIVO'
    end
    object CDSProdutoPRO_VOLUME: TFloatField
      FieldName = 'PRO_VOLUME'
    end
    object CDSProdutoPRO_ALIQICMS: TFloatField
      FieldName = 'PRO_ALIQICMS'
    end
    object CDSProdutoPRO_COMPLEM: TStringField
      FieldName = 'PRO_COMPLEM'
      Size = 50
    end
    object CDSProdutoPRO_CODREF: TStringField
      FieldName = 'PRO_CODREF'
    end
    object CDSProdutoPRO_OBSERVACAO: TMemoField
      FieldName = 'PRO_OBSERVACAO'
      BlobType = ftMemo
      Size = 400
    end
  end
  object dspProduto: TDataSetProvider
    DataSet = qryProduto
    Left = 88
    Top = 571
  end
  object qryProduto: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'select PRO_CODIGO            ,'
      'EMP_CODIGO            ,'
      'DIV_CODIGO            ,'
      'LIN_CODIGO            ,'
      'NBM_CODIGO            ,'
      'FASE_CODIGO           ,'
      'PRO_NOME              ,'
      'PRO_UNIDADE           ,'
      'PRO_PESOLIQ           ,'
      'PRO_PESOBRU           ,'
      'PRO_CODTRIBUTARIO     ,'
      'PRO_NUMEROEMB         ,'
      'PRO_ALIQIPI           ,'
      'PRO_PRECOVENDA        ,'
      'PRO_ATIVO             ,'
      'PRO_VOLUME            ,'
      'PRO_ALIQICMS          ,'
      'PRO_COMPLEM           ,'
      'PRO_CODREF            ,'
      'PRO_OBSERVACAO        '
      'from PRODUTO'
      'order by Pro_Codigo')
    Left = 24
    Top = 571
  end
  object CDSProduto_entidade: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspProdutoEntidade'
    Left = 200
    Top = 619
    object CDSProduto_entidadeENT_CODIGO: TStringField
      FieldName = 'ENT_CODIGO'
      Required = True
      Size = 5
    end
    object CDSProduto_entidadePRE_CODIGO_ENTIDADE: TStringField
      FieldName = 'PRE_CODIGO_ENTIDADE'
      Required = True
    end
    object CDSProduto_entidadePRO_CODIGO: TStringField
      FieldName = 'PRO_CODIGO'
      Required = True
    end
    object CDSProduto_entidadePRE_DESCRICAO: TStringField
      FieldName = 'PRE_DESCRICAO'
      Size = 70
    end
    object CDSProduto_entidadePRE_MEDIDA: TStringField
      FieldName = 'PRE_MEDIDA'
      Size = 12
    end
    object CDSProduto_entidadePRE_UNIDADE: TFloatField
      FieldName = 'PRE_UNIDADE'
    end
    object CDSProduto_entidadePRE_UNIREF: TStringField
      FieldName = 'PRE_UNIREF'
      Size = 3
    end
  end
  object dspProdutoEntidade: TDataSetProvider
    DataSet = qryProdutoEntidade
    Left = 88
    Top = 619
  end
  object qryProdutoEntidade: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'select '
      'ENT_CODIGO           ,'
      'PRE_CODIGO_ENTIDADE  ,'
      'PRO_CODIGO           ,'
      'PRE_DESCRICAO        ,'
      'PRE_MEDIDA           ,'
      'PRE_UNIDADE          ,'
      'PRE_UNIREF           '
      'from ProdutoEntidade'
      'order by PRE_CODIGO_ENTIDADE')
    Left = 24
    Top = 619
  end
  object CDSTabela_preco: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspTabelaPreco'
    Left = 184
    Top = 667
    object CDSTabela_precoTAB_CODIGO: TStringField
      FieldName = 'TAB_CODIGO'
      Required = True
      Size = 3
    end
    object CDSTabela_precoTAB_DESCRICAO: TStringField
      FieldName = 'TAB_DESCRICAO'
      Size = 50
    end
    object CDSTabela_precoTAB_COLUNA: TStringField
      FieldName = 'TAB_COLUNA'
      Size = 1
    end
    object CDSTabela_precoTAB_VIG_INICIO: TDateTimeField
      FieldName = 'TAB_VIG_INICIO'
    end
    object CDSTabela_precoTAB_VIG_TERMINO: TDateTimeField
      FieldName = 'TAB_VIG_TERMINO'
    end
    object CDSTabela_precoTAB_DESC1: TFloatField
      FieldName = 'TAB_DESC1'
    end
    object CDSTabela_precoTAB_DESC2: TFloatField
      FieldName = 'TAB_DESC2'
    end
    object CDSTabela_precoTAB_DESC3: TFloatField
      FieldName = 'TAB_DESC3'
    end
    object CDSTabela_precoTAB_DESC4: TFloatField
      FieldName = 'TAB_DESC4'
    end
    object CDSTabela_precoTAB_DESC5: TFloatField
      FieldName = 'TAB_DESC5'
    end
    object CDSTabela_precoTAB_DESC6: TFloatField
      FieldName = 'TAB_DESC6'
    end
    object CDSTabela_precoTAB_DESC7: TFloatField
      FieldName = 'TAB_DESC7'
    end
    object CDSTabela_precoTAB_DESC8: TFloatField
      FieldName = 'TAB_DESC8'
    end
    object CDSTabela_precoTAB_DESC9: TFloatField
      FieldName = 'TAB_DESC9'
    end
    object CDSTabela_precoTAB_DESC10: TFloatField
      FieldName = 'TAB_DESC10'
    end
    object CDSTabela_precoTAB_JUROSMES: TFloatField
      FieldName = 'TAB_JUROSMES'
    end
    object CDSTabela_precoTAB_COMISSAO: TFloatField
      FieldName = 'TAB_COMISSAO'
    end
    object CDSTabela_precoTAB_DESC_REDESPACHO: TStringField
      FieldName = 'TAB_DESC_REDESPACHO'
      Size = 2
    end
  end
  object dspTabelaPreco: TDataSetProvider
    DataSet = qryTabelaPreco
    Left = 88
    Top = 667
  end
  object qryTabelaPreco: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'select * from Tabelapreco'
      'order by Tab_Codigo')
    Left = 24
    Top = 667
  end
  object CDSItem_tabela: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspItemTabela'
    Left = 176
    Top = 715
    object CDSItem_tabelaTAB_CODIGO: TStringField
      FieldName = 'TAB_CODIGO'
      Required = True
      Size = 3
    end
    object CDSItem_tabelaPRO_CODIGO: TStringField
      FieldName = 'PRO_CODIGO'
      Required = True
    end
    object CDSItem_tabelaITT_COLUNA: TStringField
      FieldName = 'ITT_COLUNA'
      Required = True
      Size = 1
    end
    object CDSItem_tabelaITT_PRECO: TFloatField
      FieldName = 'ITT_PRECO'
    end
    object CDSItem_tabelaITT_STATUS: TStringField
      FieldName = 'ITT_STATUS'
      Size = 1
    end
    object CDSItem_tabelaITT_PM: TFloatField
      FieldName = 'ITT_PM'
    end
  end
  object dspItemTabela: TDataSetProvider
    DataSet = qryItemTabela
    Left = 88
    Top = 715
  end
  object qryItemTabela: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'select TAB_CODIGO       ,'
      'PRO_CODIGO       ,'
      'ITT_COLUNA       ,'
      'ITT_PRECO        ,'
      'ITT_STATUS       ,'
      'ITT_PM           '
      'from ITEMTABELA'
      'order by Tab_codigo')
    Left = 24
    Top = 715
  end
  object qryRepresentante: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'select'
      'r.REP_CODIGO       ,'
      'r.BAN_CODIGO       ,'
      'BAN_NOME         ,'
      'CID_CODIGO       ,'
      'SUP_CODIGO       ,'
      'REP_NOME         ,'
      'REP_RESPONSAVEL  ,'
      'REP_ENDERECO     ,'
      'REP_BAIRRO       ,'
      'REP_FONE         ,'
      'REP_CEP          ,'
      'REP_NUMCONTA     ,'
      'REP_AGENCIA      ,'
      'REP_COMISSAO     ,'
      'REP_CNPJ         ,'
      'REP_CPF          ,'
      'REP_INSCEST      ,'
      'REP_DATAINA      ,'
      'REP_RG           ,'
      'REP_DATACAD      ,'
      'REP_SALDOINICIAL ,'
      'REP_OBSERVACAO   ,'
      'REP_CELULAR      ,'
      'REP_EMAIL        ,'
      'ENT_CODIGO       ,'
      'r.HIST_CODIGO      ,'
      'HIST_DESCRICAO   ,'
      'r.tab_codigo,'
      'REP_RAZAO        ,'
      'REP_FONE1        ,'
      'REP_CONTABCO     ,'
      'REP_RPA          ,'
      'TIPO_COMISSAOREP ,'
      'REP_FRETE        '
      'from Representante R, Banco B, Historico h'
      'where r.Ban_codigo = b.Ban_codigo(+)'
      'and H.Hist_codigo(+) = r.hist_codigo'
      'order by r.Rep_Codigo')
    Left = 24
    Top = 763
  end
  object dspRepresentante: TDataSetProvider
    DataSet = qryRepresentante
    Left = 88
    Top = 763
  end
  object CDSRepresentante: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspRepresentante'
    Left = 176
    Top = 755
    object CDSRepresentanteREP_CODIGO: TStringField
      FieldName = 'REP_CODIGO'
      Size = 3
    end
    object CDSRepresentanteBAN_CODIGO: TStringField
      FieldName = 'BAN_CODIGO'
      Size = 3
    end
    object CDSRepresentanteBAN_NOME: TStringField
      FieldName = 'BAN_NOME'
      Size = 40
    end
    object CDSRepresentanteCID_CODIGO: TStringField
      FieldName = 'CID_CODIGO'
      Size = 4
    end
    object CDSRepresentanteSUP_CODIGO: TStringField
      FieldName = 'SUP_CODIGO'
      Size = 3
    end
    object CDSRepresentanteREP_NOME: TStringField
      FieldName = 'REP_NOME'
      Size = 40
    end
    object CDSRepresentanteREP_RESPONSAVEL: TStringField
      FieldName = 'REP_RESPONSAVEL'
      Size = 40
    end
    object CDSRepresentanteREP_ENDERECO: TStringField
      FieldName = 'REP_ENDERECO'
      Size = 40
    end
    object CDSRepresentanteREP_BAIRRO: TStringField
      FieldName = 'REP_BAIRRO'
      Size = 25
    end
    object CDSRepresentanteREP_FONE: TStringField
      FieldName = 'REP_FONE'
      Size = 13
    end
    object CDSRepresentanteREP_CEP: TStringField
      FieldName = 'REP_CEP'
      Size = 9
    end
    object CDSRepresentanteREP_NUMCONTA: TStringField
      FieldName = 'REP_NUMCONTA'
      Size = 10
    end
    object CDSRepresentanteREP_AGENCIA: TStringField
      FieldName = 'REP_AGENCIA'
      Size = 10
    end
    object CDSRepresentanteREP_COMISSAO: TFloatField
      FieldName = 'REP_COMISSAO'
    end
    object CDSRepresentanteREP_CNPJ: TStringField
      FieldName = 'REP_CNPJ'
      Size = 18
    end
    object CDSRepresentanteREP_CPF: TStringField
      FieldName = 'REP_CPF'
      Size = 14
    end
    object CDSRepresentanteREP_INSCEST: TStringField
      FieldName = 'REP_INSCEST'
      Size = 21
    end
    object CDSRepresentanteREP_DATAINA: TDateTimeField
      FieldName = 'REP_DATAINA'
    end
    object CDSRepresentanteREP_RG: TStringField
      FieldName = 'REP_RG'
      Size = 12
    end
    object CDSRepresentanteREP_DATACAD: TDateTimeField
      FieldName = 'REP_DATACAD'
    end
    object CDSRepresentanteREP_SALDOINICIAL: TFloatField
      FieldName = 'REP_SALDOINICIAL'
    end
    object CDSRepresentanteREP_OBSERVACAO: TBlobField
      FieldName = 'REP_OBSERVACAO'
      Size = 1
    end
    object CDSRepresentanteREP_CELULAR: TStringField
      FieldName = 'REP_CELULAR'
      Size = 15
    end
    object CDSRepresentanteREP_EMAIL: TStringField
      FieldName = 'REP_EMAIL'
      Size = 50
    end
    object CDSRepresentanteENT_CODIGO: TStringField
      FieldName = 'ENT_CODIGO'
      Size = 5
    end
    object CDSRepresentanteHIST_CODIGO: TStringField
      FieldName = 'HIST_CODIGO'
      Size = 10
    end
    object CDSRepresentanteHIST_DESCRICAO: TStringField
      FieldName = 'HIST_DESCRICAO'
      Size = 40
    end
    object CDSRepresentanteTAB_CODIGO: TStringField
      FieldName = 'TAB_CODIGO'
      Size = 3
    end
    object CDSRepresentanteREP_RAZAO: TStringField
      FieldName = 'REP_RAZAO'
      Size = 50
    end
    object CDSRepresentanteREP_FONE1: TStringField
      FieldName = 'REP_FONE1'
      Size = 13
    end
    object CDSRepresentanteREP_CONTABCO: TStringField
      FieldName = 'REP_CONTABCO'
      Size = 10
    end
    object CDSRepresentanteREP_RPA: TStringField
      FieldName = 'REP_RPA'
      FixedChar = True
      Size = 1
    end
    object CDSRepresentanteTIPO_COMISSAOREP: TStringField
      FieldName = 'TIPO_COMISSAOREP'
      Size = 1
    end
    object CDSRepresentanteREP_FRETE: TFloatField
      FieldName = 'REP_FRETE'
    end
  end
  object qryLinhaVenda: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'select * from LinhaVenda'
      'order by Linha_Codigo')
    Left = 24
    Top = 811
  end
  object dspLinhaVenda: TDataSetProvider
    DataSet = qryLinhaVenda
    Left = 88
    Top = 811
  end
  object CDSLinha_venda: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspLinhaVenda'
    Left = 160
    Top = 811
    object CDSLinha_vendaREP_CODIGO: TStringField
      FieldName = 'REP_CODIGO'
      Required = True
      Size = 3
    end
    object CDSLinha_vendaLINHA_CODIGO: TStringField
      FieldName = 'LINHA_CODIGO'
      Required = True
      Size = 3
    end
    object CDSLinha_vendaLINHA_DESCRICAO: TStringField
      FieldName = 'LINHA_DESCRICAO'
      Size = 40
    end
  end
  object qryLocalCobranca: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select l.LOCAL_CODIGO   ,'
      'CID_CODIGO     ,'
      'l.TIPOL_CODIGO  , '
      'TIPOL_DESCRICAO,'
      'LOCAL_DESCRICAO,'
      'LOCAL_ENDERECO ,'
      'LOCAL_CEP      ,'
      'LOCAL_FONE     '
      'from LocalCobranca L, TipoLocalCobranca T'
      'where l.Tipol_Codigo = L.tipol_codigo'
      'order by Local_codigo')
    Left = 286
    Top = 16
  end
  object dspLocalCobranca: TDataSetProvider
    DataSet = qryLocalCobranca
    Left = 350
    Top = 16
  end
  object CDSLocal_cobranca: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspLocalCobranca'
    Left = 422
    Top = 16
    object CDSLocal_cobrancaLOCAL_CODIGO: TStringField
      FieldName = 'LOCAL_CODIGO'
      Required = True
      Size = 3
    end
    object CDSLocal_cobrancaCID_CODIGO: TStringField
      FieldName = 'CID_CODIGO'
      Size = 4
    end
    object CDSLocal_cobrancaTIPOL_CODIGO: TStringField
      FieldName = 'TIPOL_CODIGO'
      Size = 2
    end
    object CDSLocal_cobrancaTIPOL_DESCRICAO: TStringField
      FieldName = 'TIPOL_DESCRICAO'
    end
    object CDSLocal_cobrancaLOCAL_DESCRICAO: TStringField
      FieldName = 'LOCAL_DESCRICAO'
      Size = 40
    end
    object CDSLocal_cobrancaLOCAL_ENDERECO: TStringField
      FieldName = 'LOCAL_ENDERECO'
      Size = 40
    end
    object CDSLocal_cobrancaLOCAL_CEP: TStringField
      FieldName = 'LOCAL_CEP'
      Size = 9
    end
    object CDSLocal_cobrancaLOCAL_FONE: TStringField
      FieldName = 'LOCAL_FONE'
      Size = 10
    end
  end
  object qrySubLocalCobranca: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from SubLocalCobranca'
      'order by Local_codigo, Subl_codigo')
    Left = 286
    Top = 72
  end
  object dspSubLocalCobranca: TDataSetProvider
    DataSet = qrySubLocalCobranca
    Left = 350
    Top = 72
  end
  object CDSSublocal_cobranca: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspSubLocalCobranca'
    Left = 422
    Top = 80
    object CDSSublocal_cobrancaLOCAL_CODIGO: TStringField
      FieldName = 'LOCAL_CODIGO'
      Required = True
      Size = 3
    end
    object CDSSublocal_cobrancaSUBL_CODIGO: TStringField
      FieldName = 'SUBL_CODIGO'
      Required = True
      Size = 3
    end
    object CDSSublocal_cobrancaSUBL_NOME: TStringField
      FieldName = 'SUBL_NOME'
      Size = 40
    end
    object CDSSublocal_cobrancaSUBL_ENDERECO: TStringField
      FieldName = 'SUBL_ENDERECO'
      Size = 40
    end
  end
  object qryRamoAtividade: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from RamoAtividade'
      'order by Ramo_codigo')
    Left = 286
    Top = 128
  end
  object dspRamoAtividade: TDataSetProvider
    DataSet = qryRamoAtividade
    Left = 350
    Top = 128
  end
  object CDSRamo_atividade: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspRamoAtividade'
    Left = 430
    Top = 128
    object CDSRamo_atividadeRAMO_CODIGO: TStringField
      FieldName = 'RAMO_CODIGO'
      Required = True
      Size = 3
    end
    object CDSRamo_atividadeRAMO_DESCRICAO: TStringField
      FieldName = 'RAMO_DESCRICAO'
      Size = 40
    end
  end
  object qryMensagem: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from Mensagem'
      'order by Cod_mensagem')
    Left = 286
    Top = 184
  end
  object dspMensagem: TDataSetProvider
    DataSet = qryMensagem
    Left = 350
    Top = 184
  end
  object CDSMensagem: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspMensagem'
    Left = 430
    Top = 184
    object CDSMensagemCOD_MENSAGEM: TStringField
      FieldName = 'COD_MENSAGEM'
      Required = True
      Size = 3
    end
    object CDSMensagemTEXTO: TBlobField
      FieldName = 'TEXTO'
      Size = 1
    end
  end
  object qryTipoEndereco: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from TipoEndereco'
      'order by TipEnd_codigo')
    Left = 286
    Top = 240
  end
  object dspTipoEndereco: TDataSetProvider
    DataSet = qryTipoEndereco
    Left = 350
    Top = 240
  end
  object CDSTipo_endereco: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspTipoEndereco'
    Left = 422
    Top = 240
    object CDSTipo_enderecoTIPEND_CODIGO: TStringField
      FieldName = 'TIPEND_CODIGO'
      Required = True
      Size = 2
    end
    object CDSTipo_enderecoTIPEND_DESCRICAO: TStringField
      FieldName = 'TIPEND_DESCRICAO'
      Size = 30
    end
  end
  object qryContato: TQuery
    BeforeOpen = qryContatoBeforeOpen
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from CONTATO'
      
        'where ENT_CODIGO in (select Ent_Codigo from Entidade where Ent_E' +
        'xportadoWEB <> '#39'S'#39')'
      'order by Ent_codigo, Cont_codigo')
    Left = 286
    Top = 288
  end
  object dspContato: TDataSetProvider
    DataSet = qryContato
    Left = 350
    Top = 288
  end
  object CDSContato: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspContato'
    Left = 422
    Top = 288
    object CDSContatoENT_CODIGO: TStringField
      FieldName = 'ENT_CODIGO'
      Required = True
      Size = 5
    end
    object CDSContatoCONT_CODIGO: TStringField
      FieldName = 'CONT_CODIGO'
      Required = True
      Size = 2
    end
    object CDSContatoCONT_NOME: TStringField
      FieldName = 'CONT_NOME'
      Size = 40
    end
    object CDSContatoCONT_DEPARTAMENTO: TStringField
      FieldName = 'CONT_DEPARTAMENTO'
      Size = 25
    end
    object CDSContatoCONT_RAMAL: TStringField
      FieldName = 'CONT_RAMAL'
      Size = 4
    end
    object CDSContatoCONT_EMAIL: TStringField
      FieldName = 'CONT_EMAIL'
      Size = 50
    end
    object CDSContatoCONT_CARGO: TStringField
      FieldName = 'CONT_CARGO'
    end
    object CDSContatoCONT_NASC: TStringField
      FieldName = 'CONT_NASC'
      Size = 4
    end
    object CDSContatoCONT_FONE: TStringField
      FieldName = 'CONT_FONE'
      Size = 15
    end
  end
  object qryControle: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from ControlePadrao')
    Left = 286
    Top = 336
  end
  object dspControle: TDataSetProvider
    DataSet = qryControle
    Left = 350
    Top = 336
  end
  object CDSControle_empresas: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspControle'
    Left = 422
    Top = 336
    object CDSControle_empresasCOD_EMP: TStringField
      FieldName = 'COD_EMP'
      Size = 3
    end
    object CDSControle_empresasCOD_REF: TStringField
      FieldName = 'COD_REF'
      Size = 3
    end
  end
  object qryCondFat: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from CondFaturamento'
      '')
    Left = 286
    Top = 384
  end
  object dspCondFat: TDataSetProvider
    DataSet = qryCondFat
    Left = 350
    Top = 384
  end
  object CDSCond_fat: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspCondFat'
    Left = 422
    Top = 384
    object CDSCond_fatCONF_CODIGO: TStringField
      FieldName = 'CONF_CODIGO'
      Size = 2
    end
    object CDSCond_fatCONF_DESCRICAO: TStringField
      FieldName = 'CONF_DESCRICAO'
      Size = 40
    end
    object CDSCond_fatCONF_PERC1: TFloatField
      FieldName = 'CONF_PERC1'
    end
  end
  object qryTransportador: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from Transportadora'
      '')
    Left = 286
    Top = 432
  end
  object dspTransportador: TDataSetProvider
    DataSet = qryTransportador
    Left = 350
    Top = 432
  end
  object CDSTransportadora: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspTransportador'
    Left = 422
    Top = 432
    object CDSTransportadoraTRAN_CODIGO: TStringField
      FieldName = 'TRAN_CODIGO'
      Size = 3
    end
    object CDSTransportadoraCID_CODIGO: TStringField
      FieldName = 'CID_CODIGO'
      Size = 4
    end
    object CDSTransportadoraTRAN_NOME: TStringField
      FieldName = 'TRAN_NOME'
      Size = 40
    end
    object CDSTransportadoraTRAN_ENDERECO: TStringField
      FieldName = 'TRAN_ENDERECO'
      Size = 60
    end
    object CDSTransportadoraTRAN_PLACA: TStringField
      FieldName = 'TRAN_PLACA'
      Size = 8
    end
    object CDSTransportadoraTRAN_UFPLACA: TStringField
      FieldName = 'TRAN_UFPLACA'
      Size = 2
    end
    object CDSTransportadoraTRAN_CGCCPF: TStringField
      FieldName = 'TRAN_CGCCPF'
      Size = 18
    end
    object CDSTransportadoraTRAN_INSCEST: TStringField
      FieldName = 'TRAN_INSCEST'
      Size = 16
    end
    object CDSTransportadoraTRAN_FONE: TStringField
      FieldName = 'TRAN_FONE'
      Size = 13
    end
    object CDSTransportadoraTRAN_DATACAD: TDateTimeField
      FieldName = 'TRAN_DATACAD'
    end
    object CDSTransportadoraTRAN_DATAINA: TDateTimeField
      FieldName = 'TRAN_DATAINA'
    end
    object CDSTransportadoraTRAN_OBS: TBlobField
      FieldName = 'TRAN_OBS'
      Size = 1
    end
    object CDSTransportadoraTRAN_EMAIL: TStringField
      FieldName = 'TRAN_EMAIL'
      Size = 100
    end
  end
  object qryMotivoCancelamento: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from MotCancPedido'
      '')
    Left = 286
    Top = 479
  end
  object dspMotivoCancelamento: TDataSetProvider
    DataSet = qryMotivoCancelamento
    Left = 350
    Top = 479
  end
  object CDSMotivo_cancelamento: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspMotivoCancelamento'
    Left = 422
    Top = 479
    object CDSMotivo_cancelamentoCANP_CODIGO: TStringField
      FieldName = 'CANP_CODIGO'
      Size = 3
    end
    object CDSMotivo_cancelamentoCANP_DESCRICAO: TStringField
      FieldName = 'CANP_DESCRICAO'
      Size = 40
    end
  end
  object qryRegraPagto: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from RegrasPagto')
    Left = 286
    Top = 527
  end
  object dspRegrasPagto: TDataSetProvider
    DataSet = qryRegraPagto
    Left = 350
    Top = 527
  end
  object CDSRegra_pagto: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspRegrasPagto'
    Left = 422
    Top = 527
    object CDSRegra_pagtoREG_CODIGO: TStringField
      FieldName = 'REG_CODIGO'
      Size = 3
    end
    object CDSRegra_pagtoREG_DESCRICAO: TStringField
      FieldName = 'REG_DESCRICAO'
      Size = 50
    end
    object CDSRegra_pagtoREG_NUMPGTO: TFloatField
      FieldName = 'REG_NUMPGTO'
    end
  end
  object qryItemRegra: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from ItemRegra')
    Left = 286
    Top = 583
  end
  object dspItemRegra: TDataSetProvider
    DataSet = qryItemRegra
    Left = 350
    Top = 583
  end
  object CDSItem_regra_pagto: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspItemRegra'
    Left = 422
    Top = 583
    object CDSItem_regra_pagtoREG_CODIGO: TStringField
      FieldName = 'REG_CODIGO'
      Size = 3
    end
    object CDSItem_regra_pagtoIRG_NUMPGTO: TFloatField
      FieldName = 'IRG_NUMPGTO'
    end
    object CDSItem_regra_pagtoIRG_DIAS: TFloatField
      FieldName = 'IRG_DIAS'
    end
  end
  object qryTipoPedido: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from TipoPedido')
    Left = 286
    Top = 631
  end
  object dspTipoPedido: TDataSetProvider
    DataSet = qryTipoPedido
    Left = 350
    Top = 631
  end
  object CDSTipo_pedido: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspTipoPedido'
    Left = 422
    Top = 631
    object CDSTipo_pedidoTIPP_CODIGO: TStringField
      FieldName = 'TIPP_CODIGO'
      Size = 2
    end
    object CDSTipo_pedidoTIPP_DESCRICAO: TStringField
      FieldName = 'TIPP_DESCRICAO'
      Size = 30
    end
  end
  object qryICMS: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from ICMSDIFERIDO')
    Left = 286
    Top = 687
  end
  object dspICMS: TDataSetProvider
    DataSet = qryICMS
    Left = 350
    Top = 687
  end
  object CDSIcms_diferido: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspICMS'
    Left = 422
    Top = 687
    object CDSIcms_diferidoICMS_CODIGO: TStringField
      FieldName = 'ICMS_CODIGO'
      Size = 2
    end
    object CDSIcms_diferidoICMS_DESCRICAO: TStringField
      FieldName = 'ICMS_DESCRICAO'
      Size = 30
    end
    object CDSIcms_diferidoICMS_PERCENTUAL: TFloatField
      FieldName = 'ICMS_PERCENTUAL'
    end
  end
  object qryTabelaDesconto: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from TABELADESCONTO')
    Left = 286
    Top = 743
  end
  object dspTabelaDesconto: TDataSetProvider
    DataSet = qryTabelaDesconto
    Left = 350
    Top = 743
  end
  object CDSTabela_desconto: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspTabelaDesconto'
    Left = 422
    Top = 743
    object CDSTabela_descontoENT_CODIGO: TStringField
      FieldName = 'ENT_CODIGO'
      Size = 5
    end
    object CDSTabela_descontoTAB_DESC1: TFloatField
      FieldName = 'TAB_DESC1'
    end
    object CDSTabela_descontoTAB_DESC2: TFloatField
      FieldName = 'TAB_DESC2'
    end
    object CDSTabela_descontoTAB_DESC3: TFloatField
      FieldName = 'TAB_DESC3'
    end
    object CDSTabela_descontoTAB_DESC4: TFloatField
      FieldName = 'TAB_DESC4'
    end
    object CDSTabela_descontoTAB_DESC5: TFloatField
      FieldName = 'TAB_DESC5'
    end
    object CDSTabela_descontoTAB_DESC6: TFloatField
      FieldName = 'TAB_DESC6'
    end
    object CDSTabela_descontoTAB_DESC7: TFloatField
      FieldName = 'TAB_DESC7'
    end
    object CDSTabela_descontoTAB_DESC8: TFloatField
      FieldName = 'TAB_DESC8'
    end
    object CDSTabela_descontoTAB_DESC9: TFloatField
      FieldName = 'TAB_DESC9'
    end
    object CDSTabela_descontoTAB_DESC10: TFloatField
      FieldName = 'TAB_DESC10'
    end
  end
  object qryCobranca: TQuery
    BeforeOpen = qryCobrancaBeforeOpen
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select Titc_Numero, t.Tipd_Codigo, Tipd_Descricao,'
      
        't.Ent_Codigo, Titc_valor, Titc_saldo, Titc_DataEmis, Titc_DataVe' +
        'nc,TITC_DATAPGTO,'
      
        't.Local_Codigo, Local_descricao, Rep_codigo, t.Emp_codigo, Bkp_S' +
        'erie, Bkp_Numero'
      
        'from titcredito t, TipoDocumento d, LocalCobranca l, BackuP_vend' +
        'a b'
      'where titc_pagrec = '#39'R'#39
      'and d.tipd_codigo = t.tipd_codigo'
      'and l.local_codigo = t.local_codigo'
      'and b.nota_serie||b.nota_numero = t.nota_serie||t.nota_numero'
      'and titc_saldo > 0'
      'and TITC_DATAEMIS >=:DATA'
      'order by Titc_DataEmis')
    Left = 286
    Top = 799
    ParamData = <
      item
        DataType = ftDate
        Name = 'DATA'
        ParamType = ptInput
      end>
  end
  object dspCobranca: TDataSetProvider
    DataSet = qryCobranca
    Left = 350
    Top = 799
  end
  object CDSCobranca: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspCobranca'
    Left = 422
    Top = 799
    object CDSCobrancaTITC_NUMERO: TStringField
      FieldName = 'TITC_NUMERO'
    end
    object CDSCobrancaTIPD_CODIGO: TStringField
      FieldName = 'TIPD_CODIGO'
      Size = 1
    end
    object CDSCobrancaTIPD_DESCRICAO: TStringField
      DisplayWidth = 20
      FieldName = 'TIPD_DESCRICAO'
    end
    object CDSCobrancaENT_CODIGO: TStringField
      FieldName = 'ENT_CODIGO'
      Size = 5
    end
    object CDSCobrancaTITC_VALOR: TFloatField
      FieldName = 'TITC_VALOR'
    end
    object CDSCobrancaTITC_SALDO: TFloatField
      FieldName = 'TITC_SALDO'
    end
    object CDSCobrancaTITC_DATAEMIS: TDateTimeField
      FieldName = 'TITC_DATAEMIS'
    end
    object CDSCobrancaTITC_DATAVENC: TDateTimeField
      FieldName = 'TITC_DATAVENC'
    end
    object CDSCobrancaTITC_DATAPGTO: TDateTimeField
      FieldName = 'TITC_DATAPGTO'
    end
    object CDSCobrancaLOCAL_CODIGO: TStringField
      FieldName = 'LOCAL_CODIGO'
      Size = 3
    end
    object CDSCobrancaREP_CODIGO: TStringField
      FieldName = 'REP_CODIGO'
      Size = 3
    end
    object CDSCobrancaEMP_CODIGO: TStringField
      FieldName = 'EMP_CODIGO'
      Size = 3
    end
    object CDSCobrancaBKP_SERIE: TStringField
      FieldName = 'BKP_SERIE'
      Size = 3
    end
    object CDSCobrancaBKP_NUMERO: TStringField
      FieldName = 'BKP_NUMERO'
      Size = 9
    end
  end
  object qryEstado: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select * from Estado')
    Left = 286
    Top = 855
  end
  object dspEstado: TDataSetProvider
    DataSet = qryEstado
    Left = 350
    Top = 855
  end
  object CDSEstado: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspEstado'
    Left = 422
    Top = 855
    object CDSEstadoEST_SIGLA: TStringField
      FieldName = 'EST_SIGLA'
      Size = 2
    end
    object CDSEstadoEST_NOME: TStringField
      FieldName = 'EST_NOME'
    end
    object CDSEstadoEST_PER_ICMS: TFloatField
      FieldName = 'EST_PER_ICMS'
    end
    object CDSEstadoEST_PER_FRET: TFloatField
      FieldName = 'EST_PER_FRET'
    end
    object CDSEstadoEST_COD_UF: TStringField
      FieldName = 'EST_COD_UF'
      Size = 2
    end
  end
  object _Pedidos: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dsp_Pedidos'
    Left = 920
    Top = 16
  end
  object dsp_Pedidos: TXMLTransformProvider
    TransformRead.TransformationFile = 'C:\INDUSTRIAL\EXE\WEB\Config\ToDp_Pedido.xtr'
    XMLDataFile = 'C:\INDUSTRIAL\EXE\WEB\Files\Retorno\P_070141.xml'
    Left = 840
    Top = 16
  end
  object _ItemPedVenda: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dsp_ItemPedVenda'
    Left = 920
    Top = 72
  end
  object dsp_ItemPedVenda: TXMLTransformProvider
    TransformRead.TransformationFile = 'C:\INDUSTRIAL\EXE\WEB\Config\ToDp_Itens.xtr'
    XMLDataFile = 'C:\INDUSTRIAL\EXE\WEB\Files\Retorno\PI070W07000012001.xml'
    Left = 832
    Top = 72
  end
  object dsp_Clientes: TXMLTransformProvider
    TransformRead.TransformationFile = 'C:\INDUSTRIAL\EXE\WEB\Config\ToDp_Cliente.xtr'
    XMLDataFile = 'C:\INDUSTRIAL\EXE\WEB\Files\Retorno\C_070145.xml'
    Left = 832
    Top = 128
  end
  object _Clientes: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dsp_Clientes'
    Left = 920
    Top = 128
  end
  object dsp_Endereco: TXMLTransformProvider
    TransformRead.TransformationFile = 'C:\INDUSTRIAL\EXE\WEB\Config\ToDp_Endereco.xtr'
    XMLDataFile = 'C:\INDUSTRIAL\EXE\WEB\Files\Retorno\CE07001519001.xml'
    Left = 832
    Top = 176
  end
  object _Endereco: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dsp_Endereco'
    Left = 920
    Top = 176
  end
  object dsp_Contato: TXMLTransformProvider
    TransformRead.TransformationFile = 'C:\INDUSTRIAL\EXE\WEB\Config\ToDp_Contato.xtr'
    XMLDataFile = 'C:\INDUSTRIAL\EXE\WEB\Files\Retorno\CC07001732001.xml'
    Left = 832
    Top = 232
  end
  object _Contato: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dsp_Contato'
    Left = 920
    Top = 232
  end
  object qryPedidos: TQuery
    BeforeOpen = qryPedidosBeforeOpen
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'select'
      'BKP_PEDIDO as PED_NUMERO,'
      'b.ENT_CODIGO,'
      'CONF_CODIGO,'
      'EMP_CODIGO,'
      'DIV_CODIGO,'
      'COD_USUA,'
      'TRAN_CODIGO,'
      'CANP_CODIGO,'
      'REG_CODIGO ,'
      'TIPP_CODIGO,'
      'SUP_CODIGO  ,'
      'REP_CODIGO   ,'
      'PED_DATAPED   ,'
      'PED_DATACHE  ,'
      'PED_COMISREP ,'
      'PED_COMISSUP ,'
      'PED_ALIQFRETE ,'
      'PED_ALIQSEGURO ,'
      'PED_TIPOFRETE ,'
      'PED_OBS ,'
      'PED_DATADIGI,'
      'PED_PEDCLIE ,'
      'PED_PEDREPRE,'
      'PED_VALOR ,'
      'PED_TOTALPROD,'
      'PED_SITUACAO,'
      'PED_ALIQDESC,'
      'PED_DESCONTO,'
      'PED_DATACANC,'
      'TRAN_CODIGO_REDESPACHO,'
      'LOCAL_CODIGO,'
      'PED_PESOLIQ,'
      'PED_PESOBRU'
      'from PedidosVenda p, Backup_Pedido b'
      'where b.Ped_Numero||b.Ent_Codigo = p.Ped_Numero||p.Ent_codigo'
      'and EMP_CODIGO in (Select Cod_Emp from ControlePadrao)'
      'and (PED_DATAPED >= :DATA OR PED_SITUACAO = '#39'P'#39')'
      'order by b.Bkp_Pedido')
    Left = 558
    Top = 24
    ParamData = <
      item
        DataType = ftDate
        Name = 'DATA'
        ParamType = ptInput
      end>
  end
  object dspPedidos: TDataSetProvider
    DataSet = qryPedidos
    Left = 622
    Top = 24
  end
  object CDSPedido: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspPedidos'
    Left = 694
    Top = 24
    object CDSPedidoPED_NUMERO: TStringField
      FieldName = 'PED_NUMERO'
      Size = 9
    end
    object CDSPedidoENT_CODIGO: TStringField
      FieldName = 'ENT_CODIGO'
      Size = 5
    end
    object CDSPedidoCONF_CODIGO: TStringField
      FieldName = 'CONF_CODIGO'
      Size = 2
    end
    object CDSPedidoEMP_CODIGO: TStringField
      FieldName = 'EMP_CODIGO'
      Size = 3
    end
    object CDSPedidoDIV_CODIGO: TStringField
      FieldName = 'DIV_CODIGO'
      Size = 2
    end
    object CDSPedidoCOD_USUA: TStringField
      FieldName = 'COD_USUA'
      Size = 10
    end
    object CDSPedidoTRAN_CODIGO: TStringField
      FieldName = 'TRAN_CODIGO'
      Size = 3
    end
    object CDSPedidoCANP_CODIGO: TStringField
      FieldName = 'CANP_CODIGO'
      Size = 3
    end
    object CDSPedidoREG_CODIGO: TStringField
      FieldName = 'REG_CODIGO'
      Size = 3
    end
    object CDSPedidoTIPP_CODIGO: TStringField
      FieldName = 'TIPP_CODIGO'
      Size = 2
    end
    object CDSPedidoSUP_CODIGO: TStringField
      FieldName = 'SUP_CODIGO'
      Size = 3
    end
    object CDSPedidoREP_CODIGO: TStringField
      FieldName = 'REP_CODIGO'
      Size = 3
    end
    object CDSPedidoPED_DATAPED: TDateTimeField
      FieldName = 'PED_DATAPED'
    end
    object CDSPedidoPED_DATACHE: TDateTimeField
      FieldName = 'PED_DATACHE'
    end
    object CDSPedidoPED_COMISREP: TFloatField
      FieldName = 'PED_COMISREP'
    end
    object CDSPedidoPED_COMISSUP: TFloatField
      FieldName = 'PED_COMISSUP'
    end
    object CDSPedidoPED_ALIQFRETE: TFloatField
      FieldName = 'PED_ALIQFRETE'
    end
    object CDSPedidoPED_ALIQSEGURO: TFloatField
      FieldName = 'PED_ALIQSEGURO'
    end
    object CDSPedidoPED_TIPOFRETE: TStringField
      FieldName = 'PED_TIPOFRETE'
      Size = 1
    end
    object CDSPedidoPED_OBS: TStringField
      FieldName = 'PED_OBS'
      Size = 80
    end
    object CDSPedidoPED_DATADIGI: TDateTimeField
      FieldName = 'PED_DATADIGI'
    end
    object CDSPedidoPED_PEDCLIE: TStringField
      FieldName = 'PED_PEDCLIE'
      Size = 9
    end
    object CDSPedidoPED_PEDREPRE: TStringField
      FieldName = 'PED_PEDREPRE'
      Size = 9
    end
    object CDSPedidoPED_VALOR: TFloatField
      FieldName = 'PED_VALOR'
    end
    object CDSPedidoPED_TOTALPROD: TFloatField
      FieldName = 'PED_TOTALPROD'
    end
    object CDSPedidoPED_SITUACAO: TStringField
      FieldName = 'PED_SITUACAO'
      Size = 1
    end
    object CDSPedidoPED_ALIQDESC: TFloatField
      FieldName = 'PED_ALIQDESC'
    end
    object CDSPedidoPED_DESCONTO: TFloatField
      FieldName = 'PED_DESCONTO'
    end
    object CDSPedidoPED_DATACANC: TDateTimeField
      FieldName = 'PED_DATACANC'
    end
    object CDSPedidoTRAN_CODIGO_REDESPACHO: TStringField
      FieldName = 'TRAN_CODIGO_REDESPACHO'
      Size = 3
    end
    object CDSPedidoLOCAL_CODIGO: TStringField
      FieldName = 'LOCAL_CODIGO'
      Size = 3
    end
    object CDSPedidoPED_PESOLIQ: TFloatField
      FieldName = 'PED_PESOLIQ'
    end
    object CDSPedidoPED_PESOBRU: TFloatField
      FieldName = 'PED_PESOBRU'
    end
  end
  object qryItem_pedido: TQuery
    BeforeOpen = qryItem_pedidoBeforeOpen
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'SELECT'
      'distinct'
      'b.BKP_PEDIDO as PED_NUMERO,'
      'i.PED_ITEM,'
      'BKP_SERIE as NOTA_SERIE,'
      'BKP_NUMERO as NOTA_NUMERO,'
      'ITNV_DATAFAT,'
      'i.PRO_CODIGO        ,'
      'i.EMP_CODIGO,'
      'ITPV_QUANTIDADE,'
      'ITPV_VALORUNIT,'
      'ITPV_ALIQDESC     ,'
      'ITPV_ALIQIPI      ,'
      'ITPV_COMISREP ,'
      'ITPV_PRECOGERADO ,'
      'ITPV_PENDENTE     ,'
      'ITPV_PREVISAO     ,'
      'ITPV_DESC2        ,'
      'ITPV_DESC3        ,'
      'ITPV_DESC4        ,'
      'ITPV_DESC5        ,'
      'ITPV_ALIQICMS    ,'
      'i.ICMS_CODIGO       ,'
      'ITPV_CODTRIBUTARIO,'
      'ITPV_OBSERVACAO'
      'from BACKUP_PEDIDO b, ITEMPEDVENDA i'
      
        'left join MovItemPedVenda m on i.Ped_Numero||i.Ped_Item = m.Ped_' +
        'Numero||m.Ped_Item'
      
        'left join ItemNotaVenda n on m.Nota_Serie||m.Nota_Numero||m.Ent_' +
        'codigo = n.Nota_Serie||n.Nota_Numero||n.Ent_codigo'
      
        'left join Backup_venda bv on n.Nota_Serie||n.Nota_Numero||n.Ent_' +
        'codigo = bv.Nota_Serie||bv.Nota_Numero||bv.Ent_codigo'
      'where i.PED_NUMERO = b.PED_NUMERO'
      'and i.EMP_CODIGO in (Select Cod_Emp from ControlePadrao)'
      
        'and i.Ped_Numero in (Select Ped_numero from PedidosVenda where P' +
        'ED_DATAPED >= :DATA)'
      'order by b.bkp_pedido,i.ped_item')
    Left = 558
    Top = 80
    ParamData = <
      item
        DataType = ftDate
        Name = 'DATA'
        ParamType = ptInput
      end>
  end
  object dspItem_Pedido: TDataSetProvider
    DataSet = qryItem_pedido
    Left = 622
    Top = 80
  end
  object CDSItem_pedido: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspItem_Pedido'
    Left = 694
    Top = 80
    object CDSItem_pedidoPED_NUMERO: TStringField
      FieldName = 'PED_NUMERO'
      Size = 9
    end
    object CDSItem_pedidoPED_ITEM: TStringField
      FieldName = 'PED_ITEM'
      Size = 3
    end
    object CDSItem_pedidoNOTA_SERIE: TStringField
      FieldName = 'NOTA_SERIE'
      Size = 3
    end
    object CDSItem_pedidoNOTA_NUMERO: TStringField
      FieldName = 'NOTA_NUMERO'
      Size = 9
    end
    object CDSItem_pedidoITNV_DATAFAT: TDateTimeField
      FieldName = 'ITNV_DATAFAT'
    end
    object CDSItem_pedidoPRO_CODIGO: TStringField
      FieldName = 'PRO_CODIGO'
    end
    object CDSItem_pedidoEMP_CODIGO: TStringField
      FieldName = 'EMP_CODIGO'
      Size = 3
    end
    object CDSItem_pedidoITPV_QUANTIDADE: TFloatField
      FieldName = 'ITPV_QUANTIDADE'
    end
    object CDSItem_pedidoITPV_VALORUNIT: TFloatField
      FieldName = 'ITPV_VALORUNIT'
    end
    object CDSItem_pedidoITPV_ALIQDESC: TFloatField
      FieldName = 'ITPV_ALIQDESC'
    end
    object CDSItem_pedidoITPV_ALIQIPI: TFloatField
      FieldName = 'ITPV_ALIQIPI'
    end
    object CDSItem_pedidoITPV_COMISREP: TFloatField
      FieldName = 'ITPV_COMISREP'
    end
    object CDSItem_pedidoITPV_PRECOGERADO: TFloatField
      FieldName = 'ITPV_PRECOGERADO'
    end
    object CDSItem_pedidoITPV_PENDENTE: TFloatField
      FieldName = 'ITPV_PENDENTE'
    end
    object CDSItem_pedidoITPV_PREVISAO: TDateTimeField
      FieldName = 'ITPV_PREVISAO'
    end
    object CDSItem_pedidoITPV_DESC2: TFloatField
      FieldName = 'ITPV_DESC2'
    end
    object CDSItem_pedidoITPV_DESC3: TFloatField
      FieldName = 'ITPV_DESC3'
    end
    object CDSItem_pedidoITPV_DESC4: TFloatField
      FieldName = 'ITPV_DESC4'
    end
    object CDSItem_pedidoITPV_DESC5: TFloatField
      FieldName = 'ITPV_DESC5'
    end
    object CDSItem_pedidoITPV_ALIQICMS: TFloatField
      FieldName = 'ITPV_ALIQICMS'
    end
    object CDSItem_pedidoICMS_CODIGO: TStringField
      FieldName = 'ICMS_CODIGO'
      Size = 2
    end
    object CDSItem_pedidoITPV_CODTRIBUTARIO: TStringField
      FieldName = 'ITPV_CODTRIBUTARIO'
      Size = 3
    end
    object CDSItem_pedidoITPV_OBSERVACAO: TStringField
      FieldName = 'ITPV_OBSERVACAO'
      Size = 40
    end
  end
  object qryRepresentanteTabela: TQuery
    Tag = 1
    DatabaseName = 'Industrial'
    SQL.Strings = (
      'Select a.*, TAB_DESCRICAO'
      'from Tabela_Representante a, TABELAPRECO b'
      'where a.tab_codigo = b.tab_codigo')
    Left = 16
    Top = 867
  end
  object dspRepresentanteTabela: TDataSetProvider
    DataSet = qryRepresentanteTabela
    Left = 80
    Top = 867
  end
  object CDSRepresentante_tabela: TClientDataSet
    Tag = 1
    Aggregates = <>
    Params = <>
    ProviderName = 'dspRepresentanteTabela'
    Left = 168
    Top = 859
    object CDSRepresentante_tabelaREP_CODIGO: TStringField
      FieldName = 'REP_CODIGO'
      Size = 3
    end
    object CDSRepresentante_tabelaTAB_CODIGO: TStringField
      FieldName = 'TAB_CODIGO'
      Size = 3
    end
    object CDSRepresentante_tabelaTAB_DESCRICAO: TStringField
      FieldName = 'TAB_DESCRICAO'
      Size = 50
    end
  end
  object MovPed: TClientDataSet
    Aggregates = <>
    Params = <>
    Left = 1048
    Top = 24
    object MovPedPed_Numero: TStringField
      FieldName = 'Ped_Numero'
      Size = 9
    end
    object MovPedEnt_codigo: TStringField
      FieldName = 'Ent_codigo'
      Size = 5
    end
  end
end
